Optimal. Leaf size=137 \[ \frac {i a^{7/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} d}-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {i a^4 \sqrt {a+i a \tan (c+d x)}}{8 d (a-i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3568, 43, 44,
65, 212} \begin {gather*} \frac {i a^{7/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} d}-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {i a^4 \sqrt {a+i a \tan (c+d x)}}{8 d (a-i a \tan (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 44
Rule 65
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x))^{7/2} \, dx &=-\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {\sqrt {a+x}}{(a-x)^3} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {1}{(a-x)^2 \sqrt {a+x}} \, dx,x,i a \tan (c+d x)\right )}{4 d}\\ &=-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {i a^4 \sqrt {a+i a \tan (c+d x)}}{8 d (a-i a \tan (c+d x))}+\frac {\left (i a^4\right ) \text {Subst}\left (\int \frac {1}{(a-x) \sqrt {a+x}} \, dx,x,i a \tan (c+d x)\right )}{16 d}\\ &=-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {i a^4 \sqrt {a+i a \tan (c+d x)}}{8 d (a-i a \tan (c+d x))}+\frac {\left (i a^4\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{8 d}\\ &=\frac {i a^{7/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{8 \sqrt {2} d}-\frac {i a^5 \sqrt {a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))^2}+\frac {i a^4 \sqrt {a+i a \tan (c+d x)}}{8 d (a-i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.60, size = 152, normalized size = 1.11 \begin {gather*} -\frac {i e^{-4 i (c+d x)} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}} \left (e^{i (c+d x)}+3 e^{3 i (c+d x)}+2 e^{5 i (c+d x)}-\sqrt {1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right ) (a+i a \tan (c+d x))^{7/2}}{8 \sqrt {2} d \sec ^{\frac {7}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 741 vs. \(2 (110 ) = 220\).
time = 1.00, size = 742, normalized size = 5.42
method | result | size |
default | \(-\frac {\left (i \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}+3 i \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sqrt {2}+\sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \left (\cos ^{3}\left (d x +c \right )\right ) \sqrt {2}-128 i \left (\cos ^{7}\left (d x +c \right )\right )+3 \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}+80 i \left (\cos ^{5}\left (d x +c \right )\right )+3 \sin \left (d x +c \right ) \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \cos \left (d x +c \right ) \sqrt {2}+\sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \sin \left (d x +c \right )+256 i \left (\cos ^{8}\left (d x +c \right )\right )+3 i \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}-256 \sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )+16 i \left (\cos ^{4}\left (d x +c \right )\right )+128 \sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )-224 i \left (\cos ^{6}\left (d x +c \right )\right )+96 \sin \left (d x +c \right ) \left (\cos ^{5}\left (d x +c \right )\right )+i \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \sin \left (d x +c \right )-16 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )\right ) \sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, a^{3}}{128 d \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )-1\right ) \cos \left (d x +c \right )^{3}}\) | \(742\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 138, normalized size = 1.01 \begin {gather*} -\frac {i \, {\left (\sqrt {2} a^{\frac {9}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + \frac {4 \, {\left ({\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a^{5} + 2 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{6}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} - 4 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 4 \, a^{2}}\right )}}{32 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 261 vs. \(2 (102) = 204\).
time = 0.37, size = 261, normalized size = 1.91 \begin {gather*} \frac {\sqrt {\frac {1}{2}} \sqrt {-\frac {a^{7}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{4} e^{\left (i \, d x + i \, c\right )} - \sqrt {2} \sqrt {\frac {1}{2}} \sqrt {-\frac {a^{7}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3}}\right ) - \sqrt {\frac {1}{2}} \sqrt {-\frac {a^{7}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{4} e^{\left (i \, d x + i \, c\right )} - \sqrt {2} \sqrt {\frac {1}{2}} \sqrt {-\frac {a^{7}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{3}}\right ) + \sqrt {2} {\left (-2 i \, a^{3} e^{\left (5 i \, d x + 5 i \, c\right )} - 3 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} - i \, a^{3} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^4\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________